// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-model.ts.hbs生成
import { IEditFormModel, IFormStore, IParam } from '@/core';
function getModel(): IEditFormModel {
	return {
		name: 'form',
		caption: '',
		codeName: 'Main',
		enableAutoSave: false,
		entityCodeName: 'Sys_deploy_system',
		keyPSAppDEField: 'Id',
		majorPSAppDEField: 'Display_name',
		cssName: '',
		controlType: 'FORM',
		formStyle: '',
		valueRule: getValueRule(),
		createDefaultItems: getCreateDefaultItems(),
		updateDefaultItems: getUpdateDefaultItems(),
		detailModel: getDetailModel(),
		uiEngineModel: [
			{
				name: 'engine_form',
				triggerType: 'CTRLEVENT',
				logicType: 'APPVIEWENGINE',
				eventNames: 'LOAD;SAVE;REMOVE',
				scriptCode: ``,
				entityCodeName: '',
				logicName: ``,
			},
		],
	};
}
function getValueRule() {
	return [
		{
			name: 'system_id',
			valueRuleType: 'DEFVALUERULE',
			checkMode: 1,
			ruleInfo: '只能输入英文字母数字下划线！',
			condition: {
				condOp: 'AND',
				notMode: false,
				condType: 'GROUP',
				ruleInfo: '只能输入英文字母数字下划线！',
				keyCond: false,
				conditions: [
					{
						notMode: false,
						condType: 'REGEX',
						ruleInfo: '只能输入英文字母数字下划线！',
						keyCond: false,
						regExCode: new RegExp('^\\w+$'),
					},
				],
			},
		},
	];
}

function getCreateDefaultItems() {
	return [];
}

function getUpdateDefaultItems() {
	return [];
}
function getDetailModel() {
	return {
		formpage1: {
			caption: '基本信息',
			captionItemName: '',
			name: 'formpage1',
			codeName: 'formpage1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMPAGE',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
		},
		group1: {
			caption: '系统基本信息',
			captionItemName: '',
			name: 'group1',
			codeName: 'group1',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'GROUPPANEL',
			showCaption: false,
			enableAnchor: false,
			showMoreMode: 0,
			showMoreItems: [],
		},
		id: {
			caption: '系统标识',
			captionItemName: '',
			name: 'id',
			codeName: 'id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Id',
			dataType: '25',
			required: false,
			enableCond: 1,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		system_id: {
			caption: '系统名',
			captionItemName: '',
			name: 'system_id',
			codeName: 'system_id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'System_id',
			dataType: '25',
			required: true,
			enableCond: 1,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		display_name: {
			caption: '系统显示名称',
			captionItemName: '',
			name: 'display_name',
			codeName: 'display_name',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Display_name',
			dataType: '25',
			required: true,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		binding_id: {
			caption: '绑定标识',
			captionItemName: '',
			name: 'binding_id',
			codeName: 'binding_id',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Binding_id',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		description: {
			caption: '描述',
			captionItemName: '',
			name: 'description',
			codeName: 'description',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: '',
			fieldCodeName: 'Description',
			dataType: '25',
			required: false,
			enableCond: 3,
			ignoreInput: 0,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 24, colMD: 24 },
		},
		create_time: {
			caption: '创建时间',
			captionItemName: '',
			name: 'create_time',
			codeName: 'create_time',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			fieldCodeName: 'Create_time',
			dataType: '5',
			required: false,
			enableCond: 3,
			ignoreInput: 3,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
		update_time: {
			caption: '最后更新时间',
			captionItemName: '',
			name: 'update_time',
			codeName: 'update_time',
			disabled: false,
			visible: true,
			detailStyle: 'DEFAULT',
			detailType: 'FORMITEM',
			showCaption: true,
			enableAnchor: false,
			showMoreMode: 0,
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			fieldCodeName: 'Update_time',
			dataType: '5',
			required: false,
			enableCond: 3,
			ignoreInput: 3,
			convertToCodeItemText: false,
			layout: { parentLayout: 'TABLE_24COL', colLG: 12, colMD: 12 },
		},
	};
}
export const model = getModel();
